Skip to content

Conversation

mchangrh
Copy link
Contributor

@mchangrh mchangrh commented Sep 21, 2022

coverage @ f6f83fc -> PR

% Stmts 81.05 -> 83.6
% Branch 66.78 -> 77.98
% Funcs 68.98 -> 77.72
% Lines 81.56 -> 84.45

@mchangrh
Copy link
Contributor Author

mchangrh commented Sep 21, 2022

Changes

packages

  • add @types/sinon
  • add axios-mock-adapter in lieu of sinon fetch injection
  • add @istanbuljs/nyc-config-typescript for sensible nyc defaults

misc

  • add ./coverage directory to gitignore
  • add coverage tests to CI/CD

Mock Server

  • restructured webhooks to all be under /webhook path
  • move mocks to subdirectory

NPM Scripts

  • test:coverage -> cover
  • add cover:report

routes

  • getDaysSavedFormatted - explicitly send 0 on failiure
  • verifyToken - Add fast regex pre-check
  • lockCategories
    • DELETE - check for invalid actionType if provided
    • POST - Must be a VIP to mark videos. -> ... lock videos

utils

  • getIP
    • return 127.0.0.1 when in testing mode
    • remove req.connection since it was deprecated in node v16
    • added mock IP addresses

New Tests

  • add UserCounter mock
  • added array of lockCategories tests in new file
  • test chapters access

@mchangrh mchangrh force-pushed the more-coverage branch 2 times, most recently from 8d09fdc to 93debe4 Compare September 25, 2022 02:38
@mchangrh mchangrh marked this pull request as ready for review October 27, 2022 05:47
@mchangrh mchangrh mentioned this pull request Oct 27, 2022
@mchangrh
Copy link
Contributor Author

There are still changes that I want to implement but it's at a good enough state for now, will continue webhook tests in #518

@ajayyy ajayyy merged commit 9d72362 into ajayyy:master Oct 28, 2022
@mchangrh mchangrh deleted the more-coverage branch October 28, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants